package cn.jiyun.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.jiyun.entity.Zjgl;
import cn.jiyun.service.ZjglService;
import cn.jiyun.mapper.ZjglMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author 小九
* @description 针对表【jkgl_zjgl】的数据库操作Service实现
* @createDate 2024-10-31 15:02:44
*/
@Service
public class ZjglServiceImpl extends ServiceImpl<ZjglMapper, Zjgl>
    implements ZjglService {


    @Override
    public Page findPage(Integer pageNum, Integer pageSize, Zjgl zjgl) {
        Page page = new Page<>(pageNum,pageSize);
        LambdaQueryWrapper<Zjgl> wrapper = new LambdaQueryWrapper<>();
        wrapper.like(zjgl.getName()!=null,Zjgl::getName,zjgl.getName());
        wrapper.like(zjgl.getBdsb()!=null,Zjgl::getBdsb,zjgl.getBdsb());
        wrapper.like(zjgl.getCert()!=null,Zjgl::getCert,zjgl.getCert());
        wrapper.like(zjgl.getBh()!=null,Zjgl::getBh,zjgl.getBh());
        Page page1 = baseMapper.selectPage(page, wrapper);
        return page1;
    }




}




